import { RoleType, UserStatusType } from '@/types/enum'
import { TokenRequestData } from '@/types/interface'
export interface SendSMSRequestData {
  phone: string
}
export type SendSMSResponse = ApiResponseData<string>

export interface LoginRequestData {
  phone: string
  code: string
}

export interface LoginResponseData {
  token: string
  encode: string
  encodeName: string
  info: {
    id: number
    phone: string
    name: string
    openId: string
    createdTime: string
    lastLoginTime: string
    useFlg: UserStatusType
    role: RoleType
  }
}

export type LoginResponse = ApiResponseData<LoginResponseData>

export interface BindingRequestData {
  phone: string
  code: string
  openId: string
}

export type LogOutRequestData = TokenRequestData
